/*
  ivl_const.c  -  some useful constants

  This file is part of the IVL Library (LIBIVL).
  
  LIBIVL - library for interval computations 
  
  Copyright (c) 2007 Mateusz Paprocki

  The IVL Library is free software; you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
  (at your option) any later version.

  The IVL Library is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with the IVL Library; see the file LICENCE.  If not, write to
  the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  Boston, MA 02110-1301, USA.
*/

#include "interval.h"

int ivl_const_pi(ivl_ptr ivl) {
	int inexact = 0;
	
	if (mpfr_const_pi(IVL_LEFT(ivl), GMP_RNDD))
		inexact += 1;
	
	if (mpfr_const_pi(IVL_RIGHT(ivl), GMP_RNDU))
		inexact += 2;
		
	ivl->domain = IVL_TOTAL;

	return inexact;
}

